package com.zhouzi.zhaoyang.adapter.rvadapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.google.gson.Gson;
import com.zhouzi.zhaoyang.R;
import com.zhouzi.zhaoyang.bean.Bean5;
import com.zhouzi.zhaoyang.bean.SelectCloseAccountListBean;

import java.util.List;

public class CloseAccountAdapter extends BaseQuickAdapter<SelectCloseAccountListBean.RecordsBean,BaseViewHolder> {

    public CloseAccountAdapter(int layoutResId, @Nullable List data) {
        super(layoutResId, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, SelectCloseAccountListBean.RecordsBean item) {

        Bean5 bean5 = new Gson().fromJson(item.getSumDataFee(), Bean5.class);
        helper.setText(R.id.tvNo,"总金额："+bean5.getSumFee()+"元");
        helper.setText(R.id.tvMoney,"开始时间："+item.getBeginTime());
        helper.setText(R.id.tvPrint,"结束时间："+item.getCreatedTime());
        helper.addOnClickListener(R.id.tvPrintData);

    }
}
